<template>
    <div class="user-data-box">
      <h3>User {{ username }}</h3>
      <pre v-if="data">{{ data }}</pre>
      <p v-else>No data received yet.</p>
    </div>
  </template>
  
  <script>
  export default {
    props: {
      username: String, //  接收 username 作为 prop
      data: [Object, String, Array, Number, null],
    },
  };
  </script>